package com.demo.rocketmq.message;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 *
 * @author
 * @since
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "${demo.rocketmq.topic}", consumerGroup = "string_consumer", selectorExpression = "*")
//selectorExpression = "${demo.rocketmq.tag}
public class StringConsumer implements RocketMQListener<String> {
  @Override
  public void onMessage(String s) {
    log.info("StringConsumer 接收到 rocketmq 消息,内容:{}", s);
  }
}
